<!DOCTYPE html>
<html ng-app="app6" ng-cloak>
	<head>
		<meta charset="UTF-8">
		<title> AngularJS Tutorial 6</title>
		<style>
			[ng\:cloak], [ng-cloak], .ng-cloak{
				display: none;
			}
		</style>
	</head>
	<body>

		<div ng-controller="heroCtrl">
			<label>Hero to search for :</label>
			<input type="text" ng-model="heroName">
			<br><br>
			<button ng-click="getHeroData()">Submit</button>
			<br><br>

			{{heroData}}<br>
		</div>

		<div ng-controller="heroCtrl">
			<label>Hero Name: </label>
			<input type="text" ng-model="heroName">
			<br><br>
			<label>Real Name: </label>
			<input type="text" ng-model="realName">
			<br><br>
			<button ng-click="addHeroData(realName, heroName)">Add</button>
		</div>

		<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.9/angular.min.js"></script>
		<script type="text/javascript" src="js/exam6.js"></script>
	</body>
</html>